summaryrefslogtreecommitdiffstats
path: root/src/Generating/FinishGen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Generating/FinishGen.cpp')
-rw-r--r--src/Generating/FinishGen.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index 0564789dc..42ecdf8a8 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -10,7 +10,6 @@
#include "Globals.h"
#include "FinishGen.h"
-#include "../Noise.h"
#include "../BlockID.h"
#include "../Simulator/FluidSimulator.h" // for cFluidSimulator::CanWashAway()
#include "../Simulator/FireSimulator.h"
@@ -199,6 +198,11 @@ void cFinishGenTallGrass::GenFinish(cChunkDesc & a_ChunkDesc)
// Get the top block + 1. This is the place where the grass would finaly be placed:
int y = a_ChunkDesc.GetHeight(x, z) + 1;
+
+ if (y >= 255)
+ {
+ continue;
+ }
// Check if long grass can be placed:
if (
@@ -414,6 +418,11 @@ void cFinishGenSnow::GenFinish(cChunkDesc & a_ChunkDesc)
}
break;
}
+ default:
+ {
+ // There's no snow in the other biomes.
+ break;
+ }
}
}
} // for z
@@ -454,6 +463,11 @@ void cFinishGenIce::GenFinish(cChunkDesc & a_ChunkDesc)
}
break;
}
+ default:
+ {
+ // No icy water in other biomes.
+ break;
+ }
}
}
} // for z